package org.mybatis3.test2;

public class Printer {
    private Ink ink;
    private Paper paper;

    public Ink getInk() {
        return ink;
    }

    public void setInk(Ink ink) {
        this.ink = ink;
    }

    public Paper getPaper() {
        return paper;
    }

    public void setPaper(Paper paper) {
        this.paper = paper;
    }

    public void print(String str){
        System.out.println("使用了"+ink.getColor(255,255,0));
        for (int i=0;i<str.length();i++){
            paper.putInChar(str.charAt(i));
        }
        System.out.println("之上的内容："+this.paper.getContent());
    }
}
